//
//  HttpTool.h
//  YuDou
//
//  Created by yingqi on 2018/6/22.
//  Copyright © 2018年 yingqi. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void (^HttpSuccessBlock)(id JSON);
typedef void (^HttpFailureBlock)(NSError *error);

@interface HttpTool : NSObject

singleton_interface(HttpTool)

- (void)postWithUrl:(NSString *)url parameters:(NSDictionary *)parameters success:(HttpSuccessBlock)success failure:(HttpFailureBlock)failure;

// GET
- (void)getWithUrl:(NSString *)url parameters:(NSDictionary *)parameters success:(HttpSuccessBlock)success failure:(HttpFailureBlock)failure;

@end
